{namespace dce=ArminVieweg\Dce\ViewHelpers}
<f:alias map="{lll: 'LLL:EXT:dce/Resources/Private/Language/locallang_mod.xml:'}">
    <tr class="{f:if(condition:'{dce.uid}', then:'db', else:'file')}">
        <td class="listEntry">
            <f:if condition="{dce.uid}">
                <f:then><a href="{f:render(partial:'Module/OpenDce', arguments:'{uid:\'{dce.uid}\'}')}" class="overlayLink"></a></f:then>
                <f:else><a href="{f:render(partial:'Module/OpenStaticDce', arguments:'{identifier:\'{dce.identifier}\'}')}" class="overlayLink"></a></f:else>
            </f:if>

            <f:if condition="{dce:be.version.typo3(returnInt:'1')} < 7006000">
                <f:then><f:render partial="Module/ListItem/TypeIcon62" arguments="{dce:dce}" /></f:then>
                <f:else><f:render partial="Module/ListItem/TypeIcon" arguments="{dce:dce}" /></f:else>
            </f:if>

            <div class="dceLabel">
                <div>
                    <f:if condition="{dce.title}">
                        <f:then>
                            <span><f:translate key="{dce.title}" default="{dce.title}" /></span>
                        </f:then>
                        <f:else>
                            <span><em><f:translate key="noTitle" /></em></span>
                        </f:else>
                    </f:if>
                </div>
                <div class="small text-muted">
                    <em>
                        <f:if condition="{dce.wizardDescription}">
                            <span title="{dce.wizardDescription}">
                                <f:format.crop maxCharacters="80">
                                    <f:translate key="{dce.wizardDescription}" default="{dce.wizardDescription}" />
                                </f:format.crop>
                            </span>
                        </f:if>
                    </em>
                </div>
            </div>
        </td>

        <td class="status">
            <f:if condition="{dce.hidden} == 1">
                <f:then>
                    <span class="label label-danger text-uppercase">{f:translate(key:'{lll}disabled')}</span>
                </f:then>
                <f:else>
                    <span class="label label-success text-uppercase">{f:translate(key:'{lll}enabled')}</span>
                </f:else>
            </f:if>
        </td>
        <td class="uid">
            {dce.uid}
        </td>
        <td class="usage">
            <a href="{f:render(partial:'Module/DceInfoLink', arguments:'{dce:dce}')}" title="{f:translate(key:'{lll}relatedContentElements', arguments:'{0:\'{dce.relatedContentElementRows -> f:count()}\'}')}">
                <f:be.buttons.icon icon="mimetypes-x-content-text-picture" />
                <span>{dce.relatedContentElementRows -> f:count()}</span>
            </a>
        </td>
        <td class="dceStats">
            <f:if condition="{dce.enableContainer}">
                <span class="label label-default label-darker">
                    <span class="text-uppercase">{f:translate(key:'{lll}dceContainerEnabled')}</span>
                    <f:if condition="{dce.containerItemLimit}">({f:translate(key:'{lll}limitedToItems', arguments:'{0:\'{dce.containerItemLimit}\'}')})</f:if>
                </span>
            </f:if>
        </td>
        <td class="fieldStats">
            <span class="label label-default label-darker">{dce.fields -> f:count()} {f:translate(key:'{lll}fields')}</span>
            <f:if condition="{dce.hasTcaMappings}">
                <f:if condition="{dce.addsNewFieldsToTca}">
                    <f:then><span title="{f:translate(key:'{lll}tcaplus')}" class="label label-danger">TCA+</span></f:then>
                    <f:else><span title="{f:translate(key:'{lll}tca')}" class="label label-danger">TCA</span></f:else>
                </f:if>
            </f:if>
        </td>
        <td>
            <div class="pull-right">
                <f:if condition="{dce.hasActions}">
                    <div class="btn-group align-right">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <f:translate key="{lll}actions" /> <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li>
                                <f:if condition="{dce.useSimpleBackendView}">
                                    <f:then><a class="disabled" href="#"><f:translate key="{lll}updatePreviewTemplates" /></a></f:then>
                                    <f:else><f:link.action action="updatePreviewTemplates" arguments="{dce:dce}"><f:translate key="{lll}updatePreviewTemplates" /></f:link.action></f:else>
                                </f:if>
                            </li>
                            <li>
                                <f:if condition="{dce.hasTcaMappings}">
                                    <f:then><f:link.action action="updateTcaMappings" arguments="{dce:dce}"><f:translate key="{lll}updateTcaMappings" /></f:link.action></f:then>
                                    <f:else><a class="disabled" href="#"><f:translate key="{lll}updateTcaMappings" /></a></f:else>
                                </f:if>
                            </li>
                        </ul>
                    </div>
                </f:if>
                <f:if condition="{dce.uid}">
                    <f:then><a href="{f:render(partial:'Module/OpenDce', arguments:'{uid:\'{dce.uid}\'}')}" class="btn btn-default"><span class="fa fa-edit"></span> {f:translate(key:'{lll}edit')}</a></f:then>
                    <f:else><a href="{f:render(partial:'Module/OpenStaticDce', arguments:'{identifier:\'{dce.identifier}\'}')}" class="btn btn-default"><span class="fa fa-edit"></span> {f:translate(key:'{lll}edit')}</a></f:else>
                </f:if>
            </div>
        </td>
    </tr>
</f:alias>
